home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d27 / amac41b.arc / MACR31.QM < prev    next >
Text File  |  1991-08-27  |  43KB  |  876 lines

  1. *                      MacroMaker  MACR31.QM, v3.1b
  2. *                        Written by Tom Hogshead
  3. *                 With Macro Contributions By Tim Farley
  4. *                             August 4, 1991
  5. *
  6. *    @(2) - Refresh Macro Buffer With "Standard" Macfile
  7. *    @(3) - Merges Designated Txtfile With Current Macros, Reads Macfile
  8. *    @(4) - Appends Txtfile To Standard Txtfile & Macfile, Reads Macfile
  9. *    @(5) - Gets Error File In Window
  10. *    @(6) - Makes Dummy Txtfile From Current Macros
  11. *    @(7) - Makes & Reads Dummy Macfile From Txtfile
  12. *    @(t) - Makes & Reads Dummy Macfile From Txtfile, SMALL
  13. *    @(8) - Reads Macfile of Current Txtfile
  14. *    @(9) - Makes Macfile of Current Txtfile, No Macfile Read
  15. *    @(0) - Makes & Reads Macfile of Txtfile, With Error Window
  16. *    @(q) - Makes & Reads Macfile of Txtfile, SMALL
  17. *    @(f1)- Makes Single Column Macro
  18. *    @(f2)- Puts Command Key Beside A Single Command In A Macro
  19. *    @(f3)- Puts Command Key Beside ALL Commands In A Macro
  20. *    @(f4)- Gets A Single Command And It's Key On Screen
  21. *    @(f5)- Test TRUE/FALSE Results, Tim Farley, Author
  22. *    @(h) - Select Index Item With Cursor Line, Then <Enter>              |chg
  23. *
  24. * (Index) Use      - How to locate macro or item from Index using @h
  25. * (Description)    - MacroMaker Macros
  26. * (Requirements)   - and use
  27. * (Startup)        - See MACR.DOC for startup instructions
  28. * (Macros)         - MacroMaker Macros
  29. * (Other) Macros   - not included
  30. * (Version) history
  31. *
  32. *-- eoi
  33.  
  34. * (Index) Use;
  35. *
  36. * To locate a macro or item in this file, press @h, place the cursor
  37. * line on the desired item in the Index above, and press <enter>.
  38. * See BOOKxx.QM for more details.
  39.  
  40. * (Description):
  41.  
  42. * (MacroMaker) MACR31.ZIP Contains QEdit macros to easily convert
  43. * macros to & from text/binary (txtfile/macfile) using QMAC macro
  44. * translator.
  45.  
  46. * See RFRMxx.QM for other commenting and un-commenting macros.
  47.  
  48. * (Requirements) and Use (see MACR.DOC for (startup) instructions):
  49. *
  50. *         1. Txtfile name extension MUST be [file].QM, Macfile [file].MAC.
  51. *         2. Change ram disk c:\ (also in batch files) for your setup.
  52. *            Ram disk is optional but faster than a hard drive. Use any
  53. *            active drive letter to replace c:\.
  54. *         3. Batch files must be in path or current directory. INSERT must
  55. *            be ON. Run macros and press Enter to continue when paused.
  56. *         4. Modify "e:\qe\MACROS.xxx" in macros to your "standard" macro.
  57. *            Be careful to use or not use extension as shown, with spaces.
  58. *         5. Be sure to change "e:\qe\qconfig.dat" in the macros @f2 -
  59. *            @f4 below to the location of your qconfig.dat in your
  60. *            setup, and convert with QMAC.
  61.  
  62. * In order for macros @f2 - @f4 to find a command in QCONFIG.DAT, there
  63. * must be at least eight blank spaces betweeen the end of the command
  64. * key and the beginning of the command. If your QCONFIG.DAT has fewer
  65. * spaces, the macros must be modified in the first 'FIND' line.
  66.  
  67. * Insert must be ON.
  68.  
  69. * Replacing C:\ with a ram drive will make the macros run considerably
  70. * faster.
  71.  
  72. * These macros require "QEdit and QMAC v2.1, February, 1990" or later.
  73.  
  74. * To BEGIN, just type "START MACR" <Enter>. All pertinent files will be
  75. * loaded in the "Ring" for viewing, and MACR31.MAC is read.
  76. * Alternatively, type "START MACR 0" <Enter> and the disk copies of all
  77. * files in the "Ring" will be loaded ready for editing, saving time.
  78.  
  79. * 
  80. *┌───────────────────────────────────────────────────────────┐
  81. *│   @(2) Refreshes macro buffer with "standard" macfile     │
  82. *└───────────────────────────────────────────────────────────┘
  83. * Remember you MUST modify "e:\qe\macros.mac" with your "standard" macfile.
  84. *
  85. @2 MacroBegin
  86.     MacroRead
  87.     "e:\qe\macros.mac"  *<<<<<CHANGE
  88.     Return
  89. *
  90. * 38 bytes Fri  09-14-1990  14:05:43
  91.  
  92. * 
  93. *┌────────────────────────────────────────────────────────────────┐
  94. *│   @(3) Merges designated txtfile [file].qm with current macros │
  95. *└────────────────────────────────────────────────────────────────┘
  96.  
  97. @3 macrobegin
  98.    editfile "NUL" return                * load NUL file
  99.    "Merge macro ?" cursorright          * query for macro name,
  100.                                         * no extension
  101.    markcharacter                        * start mark
  102.    pause cut quit                       * cut macro name (no extension)
  103.                                         *  to scrap
  104.    macrowrite "dum4.mac" return return  * write current macros to temp
  105.                                         *  file
  106.    DOS "qmacM " paste return return     * append designated macros to
  107.                                         * current macros
  108.    onewindow                            * close all windows
  109.    horizontalwindow                     *
  110.    editfile "c:!" return                * open error file in window
  111.    quit                                 * quit in case earlier error
  112.                                         *  file loaded
  113.    editfile return                      * load error file in window 1
  114.    insertdate  inserttime               * put date in c:!
  115.    find "(" return return               * find first error
  116.  jfalse NOERROR:                        * if no error go to NOERROR
  117.    wordright                            *ELSE move to error line #
  118.    unmarkblock                          * un-mark any marked blocks
  119.    markblockbegin wordright             * mark error line #
  120.    cursorleft                           * move back one space to end of line #
  121.    markblockend copy                    * mark and copy line # to scrap
  122.    savefile                             * save error file
  123.    prevwindow                           * go back to txtfile we want to append
  124.                                         *   to
  125.    gotoline paste return                * move to line with first error
  126.    makectrofscreen                      * put cursor in center of screen
  127.    pause zoomwindow                     * zoomwindow for better viewing
  128.  jump CONTINUE:                         *
  129.  NOERROR:                               * if no errors, come here
  130.    prevwindow zoomwindow                * enlarge txtfile we started in
  131.  CONTINUE:
  132.    editfile "dum4.qm" return            * load txtfile with appended macro
  133.                                         * on bottom
  134.    splitline newfile "N" return         * re-load in case previous copy is
  135.                                         *  loaded
  136.    endfile addline                      * insert blank line for footing
  137.   "*...Tom Hogshead "                   * insert name (change to yours)
  138.   insertdate inserttime                 * insert date and time
  139.   "Appended "                           *
  140.   paste                                 * paste file name we are appending
  141.   endline                               * move to end of file name
  142.   ".qm to current macros"               * finish message
  143.   unmarkblock                           * un-mark all blocks
  144.   savefile                              * save new txtfile with appended
  145.                                         *  macro
  146.   macroread "dum4.mac" return           * read current + appended macros
  147. *
  148. * 262 bytes Wed  05-01-1991  12:26:00
  149.  
  150. * 
  151. *┌───────────────────────────────────────────────────────────┐
  152. *│   @(4) Appends txtfile [file].qm  to a "standard" txtfile │
  153. *│     named macros.qm and reads appended macfile.           │
  154. *└───────────────────────────────────────────────────────────┘
  155. *  Remember you MUST modify "e:\qe\macros" (no extension) in this
  156. *  macro to your "standard" macfile.
  157.  
  158. * Be careful that the macro size of the txtfile you are appending plus
  159. * the size of your standard macros do not exceed 2k, the macro buffer
  160. * limitation. If this occurs, you will get an error message, and the
  161. * macros will not be appended.
  162.  
  163. @4 macrobegin
  164.    unmarkblock                          * unmarkblock
  165.    savefile                             * save current txtfile in case changed
  166.    DOS "qmacTA2 "                       * append
  167.    currentfilename                      * current txtfile
  168.    backspace backspace backspace        * delete current txtfile extension
  169.    " "                                  * add space
  170.   "e:\qe\macros"  *<<<<<CHANGE          * Standard macros name, no extension
  171.    return                               * start batch file
  172.    begline insertline                   * insert blank line
  173.    dropanchor currentfilename           * put current file name on line
  174.    storescrbuff "1" return              * store to scratch 1 for footing
  175.    cut                                  * cut name to scrap which deletes line
  176.    editfile "c:!" return quit           * quit error file if loaded
  177.    editfile paste return                * get back to current txtfile
  178.    onewindow                            * close all windows
  179.    horizontalwindow                     * open window
  180.    editfile "c:!" return                * get error file in window 2
  181.    insertdate  inserttime               * put date in c:!
  182.    find "(" return return               * find first error
  183.  jfalse NOERROR:                        * if no errors, go to NOERROR
  184.    wordright                            *ELSE move to error line #
  185.    unmarkblock                          * un-mark any marked blocks
  186.    markblockbegin wordright             * mark error line #
  187.    cursorleft                           * move back one space to end of line #
  188.    markblockend copy                    * mark and copy line # to scrap
  189.    savefile                             * save error file
  190.    prevwindow                           * go back to txtfile we want to append
  191.                                         *   to
  192.    gotoline paste return                * move to line with first error
  193.    makectrofscreen                      * put cursor in center of screen
  194.    pause zoomwindow                     * zoomwindow for better viewing
  195.  jump CONTINUE:                         *
  196.  NOERROR:                               *
  197.    prevwindow zoomwindow                * no error, go to
  198.  CONTINUE:
  199.    editfile "c:$" return quit           *
  200.    editfile       return killfile       * load dum3.qm
  201.    editfile "dum3.qm"    return quit
  202.    editfile              return         * load dum3.qm
  203.    begfile cursordown endline           * stamp
  204.    cursorright
  205.   "from:" cursorright
  206.    getscrbuff "1" return
  207.    unmarkblock endfile return           * line on bot
  208.   "*" cursorright "Tom Hogshead"
  209.    cursorright cursorright
  210.    insertdate inserttime                * - name/date bot
  211.   "Appnd:" cursorright
  212.    getscrbuff "1" return unmarkblock    * - file on bot
  213.    savefile macroread currentfilename   * read dum3.mac
  214.    backspace backspace "MAC" return     *
  215. *
  216. * 229 bytes Wed  05-01-1991  12:45:43
  217.  
  218. * 
  219. *┌──────────────────────────────────────────────────────────────┐
  220. *│   @(5) Gets error file (c:!) in window. Press ENTER to remove│
  221. *└──────────────────────────────────────────────────────────────┘
  222.  
  223. @5  macrobegin
  224.     horizontalwindow                                         * make window
  225.     editfile "c:!" return                                    * load c:!
  226.     makectrofscreen pause zoomwindow                         * zoom on pause
  227.     quit                                                     * quit c:!
  228. *
  229. * 17 bytes Fri  09-14-1990  14:05:55
  230.  
  231. * ┌────────────────────────────────────────────┐
  232. * │    @(6) Makes txtfile from current macros  │
  233. * └────────────────────────────────────────────┘
  234.  
  235. @6 macrobegin
  236.    macrowrite "c:$.mac" return return   * write to c:$.mac
  237.    DOS "qmact c:$" return return        * make c:$.qm
  238.    editfile "c:$.qm" return quit        * quit old c:$.qm
  239.    editfile return                      * load new c:$.qm
  240.    killfile                             * kill c:$.qm
  241.    endfile                              * to see newest macro
  242. *
  243. * 61 bytes Sat  09-15-1990  14:26:40
  244.  
  245. * 
  246. *┌───────────────────────────────────────────────────────────┐
  247. *│    @(7) Copies txtfile [file].QM to dummy txtfile.        │
  248. *│  Makes and reads macfile.                                 │
  249. *└───────────────────────────────────────────────────────────┘
  250.  
  251. @7 macrobegin
  252.    unmarkblock                          *
  253.    writeblock "c:$.qm" return           * copy file.qm
  254.    begline insertline                   *
  255.    dropanchor currentfilename           * get name
  256.    storescrbuff "1" return cut          *   to scratch
  257.    editfile return quit                 * load/quit c:$.qm             |3.1
  258.    editfile return                      * load c:$.qm
  259.    DOS "qmacbj c:$" return              * make c:$.mac
  260.    begline insertline                   *
  261.    dropanchor currentfilename           *
  262.    cut                                  * get name to scrap
  263.    editfile "c:!" return quit           * quit error file if already loaded
  264.    editfile paste return                * laod current file
  265.    onewindow                            * close all windows
  266.    horizontalwindow                     * one window
  267.    editfile "c:!" return                * load error file in window 2
  268.    insertdate inserttime                * put date and time
  269.    find "(" return return               * find first error
  270.  jfalse NOERROR:                        * if no errors, go to NOERROR
  271.    wordright                            *ELSE move to error line #
  272.    unmarkblock                          * un-mark any marked blocks
  273.    markblockbegin wordright             * mark error line #
  274.    cursorleft                           * move back one space to end of line #
  275.    markblockend copy                    * mark and copy line # to scrap
  276.    savefile                             * save error file
  277.    prevwindow                           * go back to txtfile we want
  278.                                         *   to append to
  279.    gotoline paste return                * move to line with first error
  280.    makectrofscreen                      * put cursor in center of screen
  281.    pause zoomwindow                     * zoomwindow for better viewing
  282.  jump CONTINUE:                         *
  283.  NOERROR:                               * if no errors, come here
  284.    prevwindow zoomwindow                * enlarge txtfile we started in
  285.  CONTINUE:                              *
  286.    DOS "qmact c:$" return return        * make c:$.qm
  287.    editfile "c:$.qm" return quit
  288.    editfile return                      * load c:$.qm
  289.    endfile addline                      *
  290.    "*" insertdate inserttime            * - name/date bot
  291.    getscrbuff "1" return unmarkblock    * - file on bot
  292.    killfile                             * kill c:$.qm
  293.    macroread currentfilename            * read c:$.mac
  294.    backspace backspace "MAC" return     *
  295. *
  296. * 185 bytes Wed  05-01-1991  13:19:11
  297. * 173 bytes Thu  05-16-1991  11:52:26 (TH removed unnecessary c:$.qm)
  298.  
  299. * 
  300. *┌───────────────────────────────────────────────────────────┐
  301. *│   @(8) READS macfile from txtfile [file].QM               │
  302. *└───────────────────────────────────────────────────────────┘
  303.  
  304. @8 macrobegin
  305.    macroread                            * start macroread
  306.    currentfilename                      * with current file name
  307.    backspace backspace                  * delete qm
  308.    "mac"                                * add mac
  309.    return                               * and do it
  310. *
  311. * 15 bytes Fri  09-14-1990  14:06:11
  312.  
  313. * 
  314. *┌───────────────────────────────────────────────────────────┐
  315. *│   @(9) Makes macfile from txtfile [file].QM, NO read      │
  316. *└───────────────────────────────────────────────────────────┘
  317.  
  318. @9 macrobegin
  319.    savefile                             * save file
  320.    DOS "qmacb "                         * start batch file
  321.    currentfilename                      * with current file
  322.    backspace backspace backspace        * delete extension
  323.    return                               * and do it
  324. *
  325. * 23 bytes Fri  09-14-1990  14:06:14
  326.  
  327. * 
  328. *┌───────────────────────────────────────────────────────────┐
  329. *│   @(0) Makes macfile from txtfile [file].QM               │
  330. *│   Loads macfile [file].MAC, With error window.            │
  331. *└───────────────────────────────────────────────────────────┘
  332.  
  333. @0 macrobegin
  334.    savefile                             * save file
  335.    DOS "qmacbj "                        * begin batch file
  336.    currentfilename                      * with current file name
  337.    backspace backspace backspace        * delete dot + extension
  338.    return                               * and do it
  339.    unmarkblock                          * un-mark all blocks
  340.    insertline begline                   * insert temp line
  341.    dropanchor currentfilename cut       * cut name to scrp
  342.    editfile "c:!" return quit           * quit c:!
  343.    editfile paste return                * load current file
  344.    onewindow                            * close all windows
  345.    horizontalwindow                     * one window
  346.    editfile "c:!" return                * load error file in window 2
  347.    insertdate inserttime                * put date and time
  348.    find "(" return return               * find first error
  349.  jfalse NOERROR:                        * if no errors, go to NOERROR
  350.    wordright                            *ELSE move to error line #
  351.    unmarkblock                          * un-mark any marked blocks
  352.    markblockbegin wordright             * mark error line #
  353.    cursorleft                           * move back one space to end of line #
  354.    markblockend copy                    * mark and copy line # to scrap
  355.    savefile                             * save error file
  356.    prevwindow                           * go back to txtfile we want to append
  357.                                         *   to
  358.    gotoline paste return                * move to line with first error
  359.    makectrofscreen                      * put cursor in center of screen
  360.    pause zoomwindow                     * zoomwindow for better viewing
  361.  jump CONTINUE:                         *
  362.  NOERROR:                               * if no errors, come here
  363.    prevwindow zoomwindow                * enlarge txtfile we started in
  364.  CONTINUE:                              *
  365.    macroread                            * begin macroread
  366.    currentfilename                      * with current file
  367.    backspace backspace                  * delete qm
  368.    "mac"                                * add mac
  369.    return                               * and read macfile
  370. *
  371. * 94 bytes Wed  05-01-1991  13:38:07
  372.  
  373. * 
  374. *┌───────────────────────────────────────────────────────────┐
  375. *│    @(t) Copies txtfile [file].QM to dummy txtfile.        │
  376. *│  Makes and reads macfile, small version                   │
  377. *└───────────────────────────────────────────────────────────┘
  378.  
  379. * This is an alternate version of @7. Errors during macro conversion are
  380. * not saved in an error window. It is much smaller than @7.
  381.  
  382. @t      MacroBegin                      *
  383.         unmarkblock                     *
  384.         WriteBlock "c:$.qm" Return      * copy file/block to temp file
  385.         DOS "qmacb c:$" Return Return   * make temp macfile
  386.         DOS "qmact c:$" Return Return   * make temp txtfile
  387.         EditFile "c:$.qm" Return Quit   * quit temp file from ring
  388.         EditFile Return                 * load temp txtfile
  389.         killfile                        * kill temp file
  390.         MacroRead "c:$.Mac" Return      * read temp macfile
  391. *
  392. * 95 bytes Fri  09-14-1990  14:06:07
  393.  
  394. * 
  395. *┌───────────────────────────────────────────────────────────┐
  396. *│   @(q) Makes macfile from txtfile [file].QM               │
  397. *│   Loads macfile [file].MAC, NO error window, SMALL.       │
  398. *└───────────────────────────────────────────────────────────┘
  399.  
  400. @q macrobegin
  401.    savefile                             * save file
  402.    DOS "qmacb "                         * begin batch file
  403.    currentfilename                      * with current file
  404.    backspace backspace backspace        * delete dot+extension
  405.    return                               * run batch file
  406.    return
  407.    macroread                            * begin macroread
  408.    currentfilename                      * of current file
  409.    backspace backspace                  * delete qm
  410.    "mac"                                * add mac extension
  411.    return                               * read new macfile
  412. *
  413. * 35 bytes Fri  09-14-1990  14:06:22
  414.  
  415.  
  416. * 
  417. * ----------------------------------------------------------------------
  418. * @(h) Finds first word on cursor line marked in document below
  419. * ----------------------------------------------------------------------
  420.  
  421. * See BOOKxx.QM for use of @h.
  422.  
  423. @h macrobegin
  424.         unmarkblock                     * Unmark any marked blocks
  425.         defaultwordset                  * In case altwordset on
  426.         begfile                         *
  427.         endpara                         * Move to end of Index
  428.         markline                        * Mark it
  429.         begfile                         * Move to bof
  430.         find "(" return "L" return      * Locate first Index selection line
  431.     jfalse NOMARK:                      *
  432.         makectrofscreen                 * Show top of file
  433.         begfile                         * Move back to bof
  434.         unmarkblock markline markline   * And highlight line 1
  435.         prevposition                    * Move back to first selection line
  436.         begline                         * Cursor in col 1
  437.         pause                           * Pause for Index selection
  438.         wordright markword              * Mark first word on line
  439.         copy                            * Copy word to scrap
  440.         endpara                         * Go to end of Index
  441.         find "(" paste ")"              *
  442.         return "I" return               * Find first marked word in doc
  443.     jfalse NOMARK:                      *
  444.         begline                         * If mark found go to begline
  445.         maketopofscreen scrollup        * Cursor on line 2
  446.     jump END:                           *
  447.     NOMARK:                             *
  448.         begfile                         * If no mark found go to begfile
  449.     END:
  450. *
  451. * 52 bytes Wed  07-31-1991  14:43:31 (TH @h, @4 in MACRxx.QM)
  452.  
  453. * 
  454. * ┌────────────────────────────────────┐
  455. * │   @(f1) Makes single column macro  │
  456. * └────────────────────────────────────┘
  457.  
  458. * To  make a single column macro with Alt_f1, place the cursor line
  459. * anywhere in a macro txtfile (after loading the macfile) and press Alt
  460. * and f1 at the same time. If a macro is not a marked block, the full
  461. * txtfile is made into a single column macro.
  462.  
  463. @f1 macrobegin
  464.         writeblock "c:$.qm" return      * copy block or file to c:$.qm
  465.         unmarkblock insertline begline  * insert temp line
  466.         dropanchor currentfilename cut  * cut currentfilename to scrap
  467.         DOS "qmacb c:$"  return  return * make macfile
  468.         DOS "qmact-n c:$" return return * make txtfile
  469.         editfile "c:$.qm" return quit   *
  470.         editfile return                 * load c:$.qm
  471.         endfile addline                 * insert blank line at end
  472.         "* " insertdate inserttime      * for date/time
  473.         paste unmarkblock               * get file name on line
  474.         killfile                        * kill c:$.qm
  475. *
  476. * 98 bytes Fri  09-14-1990  14:06:30
  477.  
  478. * 
  479. *┌──────────────────────────────────────────┐
  480. *│    @(f2) Puts key beside single command  │
  481. *└──────────────────────────────────────────┘
  482.  
  483. * To get the key for a single command in a macro, place the cursor line
  484. * on the command in a single column macro txtfile and press Alt_f2. The
  485. * key corresponding to the command will be listed next to the commmand.
  486.  
  487. @f2 macrobegin
  488.         unmarkblock insertline begline  * insert temp line
  489.         dropanchor currentfilename      *
  490.         storescrbuff "1" return         * get to scrbuff
  491.         cut                             * delete temp line
  492.         begline wordright markword      * get to command, mark it
  493.         copy                            * get to scrap
  494.         unmarkblock                     * unmark
  495.         editfile                        *
  496.        "e:\qe\qconfig.dat"  *<<<<<CHANGE
  497.         return                          * load qconfig.dat
  498.         begfile                         * go to begin qconfig.dat
  499.         FIND "         "                * insert 8 spaces before find
  500.         paste                           * paste command for find
  501.         return "IW" return              * find command in qconfig.dat
  502.  jfalse NOFIND:                         * mark if found, quit if not
  503.         wordright markcolumn            * move cursor to command
  504.         begline                         * go to  begline
  505.        "* "                             * insert asterisk space
  506.         begline markcolumn              * go to begline, include key
  507.         storescrbuff "2" return         * get key to scrbuff
  508.         cursordown                      * move down line
  509.         unmarkblock                     * unmark command
  510. *        quit                            * quit qconfig.dat
  511.         getscrbuff "1" return           * get currentfilename
  512.         cut                             * cut currentfilename
  513.         editfile paste return           * load currentfilename
  514.         markcolumn                      * start to mark block
  515.         gotocolumn "33" return          * postition to get key
  516.         getscrbuff "2" return           * get key
  517.         begline                         * go to begline
  518.         makectrofscreen                 * for better viewing
  519.         cursordown                      * move down to next command
  520.  jump END:                              * stop after getting key
  521.  NOFIND:                                * come here if no key for command
  522.         getscrbuff "1" return           * get currentfilename
  523.         cut                             * cut currentfilename
  524.         editfile paste return           * return to file
  525.         gotocolumn "33" return          * position to get key
  526.         "* "                            * insert asterisk space
  527.         cursordown                      * move down to next command
  528.         begline                         *
  529.  END:                                   *
  530. *
  531. * 145 bytes Mon  02-18-1991  12:32:15
  532.  
  533. * 
  534. *┌────────────────────────────────────────────────────────────────┐
  535. *│    @(f3) Puts key beside ALL commands in single column macfile │
  536. *└────────────────────────────────────────────────────────────────┘
  537.  
  538. * To get the keys for ALL commands in a macro, place the cursor
  539. * line at the top of a macro txtfile and press Alt_f3. An example of
  540. * this output is shown at the end of this macro. The keys corresponding
  541. * to each command will be listed also in a single column next to the
  542. * command.
  543.  
  544. @f3 macrobegin
  545.         unmarkblock insertline begline  * insert temp line
  546.         dropanchor currentfilename      *
  547.         storescrbuff "1" return         * 
  548.         cut                             * delete temp line
  549.  START:                                 *
  550.         endline begline                 * line blank? if so end
  551.  jfalse END:                            *
  552.         begline wordright markword      *
  553.         copy unmarkblock                * get command to scrap, unmark
  554.         editfile                        *
  555.        "e:\qe\qconfig.dat"  *<<<<<CHANGE
  556.         return                          * load qconfig.dat
  557.         begfile                         * go to begin qconfig.dat
  558.         FIND "         "                * insert 8 spaces before find
  559.         paste                           * paste command for find
  560.         return "IW" return              * find command in qconfig.dat
  561.  jfalse NOFIND:                         * mark if found, quit if not
  562.         wordright markcolumn begline    * move cursor to command
  563.        "* " begline markcolumn          * insert asterisk space
  564.         storescrbuff "2" return         * get key to scratch
  565.         cursordown unmarkblock          * move down line, unmark command
  566.         quit                            * quit qconfig.dat
  567.         getscrbuff "1" return           * get currentfilename
  568.         cut                             * cut currentfilename
  569.         editfile paste return           * load currentfilename
  570.         markcolumn                      * start to mark block
  571.         gotocolumn "33" return          * postition to get key
  572.         getscrbuff "2" return           * get key
  573.         begline makectrofscreen         * for better viewing
  574.         cursordown                      * move down to next command
  575.  jump START:                            * start on next command
  576.  NOFIND:                                * come here if no key for command
  577.         getscrbuff "1" return           * get currentfilename
  578.         cut                             * cut currentfilename
  579.         editfile paste return           * return to file
  580.         gotocolumn "33" return          * position to get key
  581.         "* "                            * insert asterisk space
  582.         cursordown                      * move down to next command
  583.         begline                         *
  584.  jump START:                            * do next line till done
  585.  END:                                   *
  586. *
  587. * 154 bytes Mon  02-18-1991  12:32:44
  588.  
  589. *-----------------
  590. * Here is what the macro Alt_f1 looks like by first marking it as a
  591. * block, then running @f1 by placing the cursor line on the line
  592. * below @f1 in c:$.qm and running @f3. (NOTE: an asterisk and
  593. * space have been added to column 1)
  594.  
  595. * *
  596. * * Converted by QMAC from: c:\$.mac
  597. * *
  598. * @f1     Macro_Begin                    <- (modified for SIZE macro)
  599. *         WriteBlock              * @w
  600. *         "c:$."                  *
  601. *         "qm"                    *
  602. *         Return                  * enter
  603. *         UnmarkBlock             * @u
  604. *         InsertLine              * ^n_i
  605. *         BegLine                 * home
  606. *         DropAnchor              * @a
  607. *         CurrentFilename         * ^n_n
  608. *         Cut                     * ^c_u
  609. *         DOS ""                  * ^n_o
  610. *         "qmacb "                *
  611. *         "c:$"                   *
  612. *         Return                  * enter
  613. *         Return                  * enter
  614. *         DOS ""                  * ^n_o
  615. *         "qmact-"                *
  616. *         "n c:$"                 *
  617. *         Return                  * enter
  618. *         Return                  * enter
  619. *         EditFile                * f3
  620. *         "c:$."                  *
  621. *         "qm"                    *
  622. *         Return                  * enter
  623. *         Quit                    * @x
  624. *         EditFile                * f3
  625. *         Return                  * enter
  626. *         EndFile                 * ^pgdn
  627. *         AddLine                 * ^n_j
  628. *         "* "
  629. *         InsertDate              * ^d
  630. *         InsertTime              * ^e
  631. *         Paste                   * ^c_p
  632. *         UnmarkBlock             * @u
  633.  
  634. *         KillFile                * ^k_z
  635. *
  636.  
  637. * 
  638. * ┌───────────────────────────────────────────────────────────────┐
  639. * │    @(f4) Retrieves a command and it's key from QCONFIG.DAT    │
  640. * └───────────────────────────────────────────────────────────────┘
  641.  
  642. * This macro retrieves a command or all commands matching a selected
  643. * find criteria from your QCONFIG.DAT file, displays the selected
  644. * command(s) and it's key on the screen, and then removes the
  645. * command(s) and it's key from the screen. For those of us who can
  646. * never remember all the commands and can never find our reference
  647. * sheet, this might help.
  648.  
  649. * To run, press Alt_f4, then enter the first letter (or more) of the
  650. * command you want to know the key for, press 'Enter' to see the the
  651. * command(s) and it's key, then press 'Enter' again to remove the
  652. * command(s) and it's key from the screen.
  653.  
  654. * For example, to find the key for appendscrbuff, press:
  655. *                     <Alt_f4>
  656. *                      app
  657. *                     <Enter>
  658.  
  659. * You should see the following highlighted on your screeen:
  660.  
  661. * ^b_a            appendscrbuff
  662.  
  663. * Entering "b" instead shows all commands beginning with "b":
  664.  
  665. * ^h              backspace
  666. * ^home           begscreen
  667. * ^pgup           begfile
  668. * home            begline
  669. * backspace           backspace    *(note, at least 8 spaces required)
  670.  
  671. * Press 'Enter' to remove the command(s) and it's key from the screen,
  672. * or press 'Esc' three times if you want to keep the command(s) on the
  673. * screen for reference.
  674.  
  675. @f4 macrobegin
  676.         unmarkblock insertline begline  * insert temp line
  677.         dropanchor currentfilename      *
  678.         cut                             * delete temp line
  679.         editfile                        *
  680.        "e:\qe\qconfig.dat"  *<<<<<CHANGE
  681.         return                          *
  682.         endline                         * blank to clear scratch
  683.         dropanchor                      * mark to clear scratch
  684.         storescrbuff "1" return         * get to scratch
  685.         unmarkblock begfile             * go to begin qconfig.dat
  686.         FIND "         "                * insert 8 spaces before find
  687.         pause                           * pause for command to find
  688.         return "i" return               * find first command
  689.         Jfalse FAIL:                    * Stop macro if search fails
  690.   jump NEXT:                            *
  691.   START:                                * come here more than 1 find
  692.         find return "i" return          * find next command
  693.   NEXT:                                 *
  694.   jfalse FINISH:                        * mark if found, quit if not
  695.         markline begline                * mark command line
  696.        "* "                             * insert asterisk space
  697.         appendscrbuff "1" return        * append to scratch
  698.         cursordown unmarkblock          * move down line, unmark command
  699.   jump START:                           * see if any more matches
  700.   FINISH:                               * come here after last find
  701.         quit                            * quit qconfig.dat
  702.         editfile paste return           * return to file
  703.         markcolumn                      * start to mark block
  704.         getscrbuff "1" return           * get command and key
  705.         delline begline                 * delete blank line, begline
  706.         maketopofscreen                 * for better viewing
  707.         pause                           * pause, then 'Enter' to..
  708.         deleteblock                     * clean up, remove block
  709.         Jump END:                       *
  710.  FAIL:                                  *
  711.         quit                            * quit qconfig.dat
  712.         editfile paste return           * return to file we were
  713.  END:                                   * editing if search fails
  714. *
  715. * 128 bytes Fri  03-29-1991  16:43:58
  716.  
  717. * 
  718. * ----------------------------------------------------------------------
  719. *    @(F5) Test TRUE/FALSE Results, Tim Farley, author
  720. * ----------------------------------------------------------------------
  721. *
  722. * Date: 07-30-90 (17:34)              Number: 936 / 937
  723. *   To: KARL BRENDEL                  Refer#: 929
  724. * From: TIM FARLEY                      Read: NO
  725. * Subj: Testing TRUE/FALSE result     Status: PUBLIC MESSAGE
  726. * Conf: REGDOS (1)                 Read Type: GENERAL (A)
  727. *
  728. * KB>I'd suggest that when you need to know what a command returns,
  729. * KB>and it appears not to return what you expect, that you write a
  730. * KB>test macro which prints TRUE or FALSE according to the return,
  731. * KB>and experiment with it.
  732. *
  733. * Surprising as it may seem (since I obviously have inside
  734. * knowledge of the editor), I do just this myself!  It's quicker
  735. * for one thing....
  736. *
  737. * Here is the macro I use:
  738. *
  739. * (TH changed key from ^F10 to @F5)
  740.  
  741. @F5  MacroBegin
  742.      JTrue true:
  743.      Find ".F." Pause Escape
  744.      Jump end:
  745.    true:
  746.      Find ".T." Pause Escape
  747.    end:
  748. *
  749. * 28 bytes Mon  07-30-1990  19:58:27 (TH added)
  750.  
  751. * Just re-wrap this to fit on one line, then put it in your
  752. * QCONFIG.DAT.
  753. *
  754. * Then, when you want to test a command, RECORD a macro that starts
  755. * with the command you wish to test, then this macro.  For
  756. * instance, if I wanted to test BegLine <Home>, I would do this:
  757.  
  758. *
  759. *      (1) Press MacroRecord <Ctrl M>
  760. *      (2) Press the key to record.  (I use <Alt F5> usually).
  761. *      (3) Press the key to test, BegLine <Home>.
  762. *      (4) Press the above macro, <Alt F5>
  763. *      (5) End macro recording <Ctrl M>.
  764. *
  765. * Now I can just move my cursor around, and hit <Alt F10>, to test
  766. * the true/false result of BegLine at different positions.  The
  767. * true or false comes up in a nice little box on the screen, and
  768. * when I press Return the box sends itself away, and does not
  769. * damage the file I am editing or anything.
  770. *
  771. * Note if you run the above <Alt F5> macro by itself, it always
  772. * returns TRUE.  QEdit does not remember the True/False state of
  773. * the last command while "idle".  Thus the necessity of recording
  774. * the above within a macro.
  775. *
  776. * --Tim Farley
  777. *   SemWare Technical Support
  778.  
  779. * (Other) Macros available: See ALLMACRO.INF.
  780. * See RFRMxx.QM for other commenting and un-commenting macros.
  781.  
  782. * (Version) History:
  783. *
  784. * 1.0  -  initial version
  785. * 1.1  -  Changed Alt-6 to keep [file].qm in ring after running.
  786. * 1.2  -  Date & time stamp put in dum.qm (Alt-6, Alt-7).
  787. * 1.3  -  Added batch files to macro13.ZIP.
  788. * 1.4  -  Changed Alt-6 & 7 to stamp [file].QM translated from.
  789. *      -  Changed Alt-0 to not pause if no errors.
  790. *      -  Added Alt-5 to see error files in window.
  791. *      -  Changed /W60 to /W70 and removed "pause" in qmact.bat.
  792. * 1.5  -  Changed Alt-7 to not pause if no errors.
  793. * 1.6  -  Shortened Alt-6, 7 & 10. Faster & no pause now if no errors.
  794. * 1.7  -  Corrected Alt-6 to write macros first. Sorry.
  795. * 1.8  -  Added Alt-4 to append text file [file].qm  macros
  796. *         to a "standard" macro and read appended macro.
  797. * 1.9  -  Added Alt-3 to merge designated macro [file].mac
  798. *         with current macros. QEdit normally overwrites
  799. *         current macros when reading a new macro.
  800. * 2.0  -  Added Alt-2 to refresh macro buffer with "standard" macro.
  801. *      -  New qmacTA2.bat for Alt-4, gets "standard" name as %2.
  802. *      -  Added Alt T & Alt N to select txtfile to read from
  803. *         sorted list of all avaialable txtfiles in directory.
  804. *      -  New SORT-T.BAT and SORT-F.BAT for Alt T & N to sort macro list.
  805. *      -  Changed Alt-4 to identify "standard" rather than batch file.
  806. *         (Modify g:\qe\macros for the name of your "standard" macro.)
  807. *      -  Shortened Alt-3,7 & 0, total 91 bytes. (Important when merging
  808. *         since QEdit macro buffer is limited to 2046 bytes macros.)
  809. *      -  Moved macroread to end of Alt-3. No problem, just in case.
  810. *         (Reading macros while executing can sometimes cause problems.)
  811. *      -  Changed Alt-5 to refresh c:!.
  812. * 2.1  -  (Internal)
  813. * 2.2  -  Added Alt-1 to select txtfile to load from list of all txtfiles
  814. *         in directory sorted by Name. Added sort-N2.bat for this macro.
  815. *      -  Changed Alt T & Alt N to select macfile, not txtfile as v2.0,
  816. *         from sorted list of all available macfiles in directory.
  817. *      -  Changed sort-T.bat, sort-N.bat and sort-N1.bat for macrs.
  818. *      -  Renamed MACCMTxx to MACROxx. Dropped MACCMTxx. Macros comments
  819. *         and instructions are now are in MACROxx.qm.
  820. *      -  Shortened highlight bar in Alt N,t. Saves ~30 bytes/macro.
  821. *      -  Changed dum.dir to $ in Alt-4 & qmacTA2.bat to shorten
  822. *      -  Added killfile to Alt-3 & 4. Changed endfile display in Alt-4.
  823. *      -  Replaced "j:\j" with "c:!" in macros and batch files to shorten.
  824. *      -  Changed qmacTA2.bat for better display.
  825. *      -  Changed select window from "c:!" to "c:$" in batch files
  826. *      -  Sort batch files (sort-xx.bat) also changed.
  827. * 2.3  -  Changed  @5 to keep error file c:! in ring.
  828. *      -  By removing " "'s, changing file name tracking in buffers,
  829. *         and shortening header and footer labels:
  830. *               - shortened @4        28 bytes
  831. *               - shortened @5         5  "
  832. *               - shortened @6        67  "
  833. *               - shortened @7        24  "
  834. *               - shortened @9         3  "
  835. *      -  Added macro size 'bytes line' at end of each macro
  836. * 2.4  -  Removed dum.qm and dum.mac from zip package
  837. *      -  Shortened Alt_6 from 147 to  54 bytes
  838. *      -  Shortened Alt_7 from 258 to 194 bytes
  839. * 2.4a -  Modified @6 and description
  840. * 2.4b -  Modified documentation.
  841. * 2.4c -  Changed file name from MACROxx to MACRxx.
  842. * 2.5  -  Changed j:j to c:! in macros and batch files.
  843. *      -  Changed down arrow #25 to ! in ^0.
  844. *      -  Changed .LST and .QL files.
  845. *      -  Removed @1, @t and @n. Newer macros to do the same thing
  846. *         are in FILExx.ZIP.
  847. * 2.6  -  Added @t, smaller faster version of @7.
  848. *      -  Added @q, smaller faster version of @0.
  849. *      -  Added @f1, @f2, @f3 and @f4 from GETCxx.ZIP and COLxx.ZIP,
  850. *         which are no longer included as seperate files, but are now
  851. *         a part of MACRxx.ZIP.
  852. *      -  Modified and shortened all but @2, @6, @8, @9 and ^1.
  853. *      -  Added killfile to @6 so writeblock return works correctly.
  854. * 2.6a -  Changed ^1 help macro key to @h key.
  855. * 2.7  -  Removed [d:]\[path] for location of QMAC from QMACxxx batch
  856. *         files. QMAC can be located anywòere in path.
  857. * 2.7a -  Modified documentation and added START.BAT.
  858. *      -  Change MACRO file names to MACR.
  859. * 2.7b -  Corrected @h Index Use instructions.
  860. * 2.8  -  Changed 4 to 8 spaces in Find for @f2 - @f4 to correctly
  861. *         find command and key.
  862. * 2.9  -  Corrected @f4 which had a missing return.
  863. * 3.0  -  Modified @F4 to stop on failed searches.
  864. * 3.1  -  Modified @3, @4, @7 and @0, also with more comments.
  865. *      -  Added @F5 written by Tim Farley.
  866. *      -  Removed unnecessary c:$.qm from @7.
  867. * 3.1a -  Changed documentation.
  868. *      -  Included v3.1a in AMAC39.ZIP, July 21, 1991.
  869. * 3.1b -  Corrected @F5 documentation, key references were wrong.      7/30/91
  870. *      -  Added latest version of @h from BOOKxx.QM.                   7/31/91
  871. *      -  MACR.DOC had old f:\.  Corrected to e:\.                     7/31/91
  872. *
  873. *
  874. *
  875. * error_sample, remove asterisk to test for errors
  876.